<template>
  <Header title="首页" withLine :type="2"></Header>
  <van-button type="warning">警告按钮</van-button>
  <van-button plain type="success">{{ lang }}</van-button>
  <van-date-picker
    v-model="currentDate"
    title="选择日期"
    :min-date="minDate"
    :max-date="maxDate"
  />
</template>

<script setup>
import { ref } from 'vue'
import { testApi } from '@/api.js'
const lang = getApp().globalData.language

const currentDate = ref(['2021', '01', '01'])
const minDate = ref(new Date(2025, 0, 1))
const maxDate = ref(new Date(2025, 11, 31))

const title = ref('Hello')
testApi
  .test({
    cityCode: 'cn_xian',
    lang: 'zh_CN',
    day: 2
  })
  .then(res => {
    console.log(res)
  })
</script>

<style></style>
